
#include "divoperation.h"
#include "exception"
DivOperation::DivOperation()
{

}

DivOperation::DivOperation(int num_1,int num_2):Operation(num_1,num_2)
{

}

int DivOperation::getResult()
{
    int result = 0;
    if(this->getNum_2()==0)
    {
        throw  "除数为0";
    }
    result = this->getNum_1()/this->getNum_2();
    return  result;
}
